<?php
$pdo=new PDO("mysql:host=127.0.0.1;dbname=tianshl_as","root","root");
$res=$pdo->query("select * from user_1 u inner join user_2 a on u.uid = a.id")->fetchAll();

$num1=1;
foreach ($res as $k => $val) {
    $num1++;
}
$num=$num1;
echo $num;
var_dump($num);
?>